package cn.dz.array02;

/**
 * @ClassName ArrayTest02
 * @package: cn.dz.array02
 * @Description 单个数组
 * @Author dz
 * @Date 2025/1/25 14:15
 * @Version 1.0
 **/
public class ArrayTest02 {
    public static void main(String[] args) {
        //定义两个数组
        int[] arr = new int[2];
        int[] arr2 = new int[3];

        //分别输出数组名及元素
        System.out.println(arr);
        System.out.println(arr[0]);
        System.out.println(arr[1]);

        System.out.println(arr2);
        System.out.println(arr2[0]);
        System.out.println(arr2[2]);

        //分别再次输出数组名及元素
        System.out.println(arr);
        System.out.println(arr[0]);
        System.out.println(arr[1]);

        System.out.println(arr2);
        System.out.println(arr2[0]);
        System.out.println(arr2[2]);
    }

}
